<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>面向对象</title>
    <script>
        class Person{
            constructor(name,age) {
                this.name=name;
                this.age=age;
            }
            show(){
                document.write(this.name+","+this.age+"<br>")
            }
        }
        let p=new Person("zhangsan",23);
        p.show();
    </script>
</head>
<body>

</body>
</html>
